package electronics.base;

public class Electronics {
/**
	 * the weight of the Electronics
	 */
	private double weight;
	/**
	 * the price of the Electronic
	 */
	private double price;
	/**
	 * the power consumption of the Electronics
	 */
	private int powerConsumption;
	/**
	 * the producer'name of the Electronics
	 */
	private String producer;
   /**
    * Construct a new object of Electronics
    */
	public Electronics() {
		
	}
	/**
	 * * Construct a <code>Electronics</code> object
	 * @param weight
	 * @param price
	 * @param powerConsumption
	 * @param producer
	 */
	public Electronics(double weight,double price,int powerConsumption,String producer) {
		this.weight = weight;
		this.price = price;
		this.powerConsumption = powerConsumption;
		this.producer = producer;
	}
	
	/**
	 * get the properties of the equipment
	 */
	
	public double getWeight() {
		return this.weight;
	}

	public double getPrice() {
		return this.price;
	}
	
	public int getPowerConsumption() {
		return this.powerConsumption;
	}
	
	public String getProducer() {
		return this.producer;
	}
	
	/**
	 * change the weight of the equipment
	 * @param newWeight
	 */
	public void setWeight(double newWeight) {
		System.out.println(weight+"change it into"+newWeight);
		weight = newWeight;
	}
	
	/**
	 * change the price of the equipment
	 * @param newPrice
	 */
	public void setPrice(double newPrice) {
		System.out.println(price+"change it into"+newPrice);
		price = newPrice;
	}
	
	/**
	 * change the powerConsumption of the equipment
	 * @param newPowerConsumption
	 */
	protected void setPowerConsumption(int newPowerConsumption) {
		System.out.println(powerConsumption+"change it into"+newPowerConsumption);
		powerConsumption = newPowerConsumption;
	}
	
	/**
	 * change the producer of the equipment
	 * @param newProducer
	 */
	void setProducer(String newProducer) {
		System.out.println(producer+"change it into"+newProducer);
		producer = newProducer;
	}
	
		
	/**
	 * 	import the information of the equipment
	 */
	void showInfo() {
		System.out.println("\nweight:"+getWeight()+
				"\nprice:"+getPrice()+
				"\npowerConsumption:"+getPowerConsumption()+
				"\nproducer:"+getProducer());
	}
}